const path = require("path");
module.exports = {
  alias: {
    // 键必须以斜线开始和结束
    "/@/": path.resolve(__dirname, "./src"),
  },
  hostname: "localhost",
  port: 3001,
  // 是否自动在浏览器打开
  open: true,
  // 是否开启 https
  https: false,
  // 服务端渲染
  ssr: false,
  // 打包输出目录
  outDir: "dist",
  base: "./",

  // 代理
  proxy: {
    "/api": {
      target: "http://localhost:5000/",
      changeOrigin: true,
      rewrite: (path) => path.replace(/^\/api/, ""),
    },
  },
};
